﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Practices.Unity;
using Easy.Domain.Core;
using Easy.Domain.Test.Models;
using Easy.Common.RegisterType;

namespace Easy.Domain.Test.Service
{
    [RegisterTypeAttribute(typeof(TestService))]
    public interface ITestService
    {
        int Add(int a, int b);
    }

    public class TestService : ITestService
    {
        //[Dependency]
        //public MySelf MySelf { get; set; }

        int ITestService.Add(int a, int b)
        {
            //throw new Exception();
            //MySelf.Add(a, b);
            return a + b;
        }
    }

    [RegisterType(typeof(MySelf))]
    public class MySelf
    {
        public int Add(int a, int b)
        {
            return 3;
        }
    }


    public class MySelfTwo : MySelf
    {

    }
}
